<template>
  <div class="icons">
    <router-link tag="div" class="icon" v-for="item in iconList" :key="item.id" :to="item.spell">
      <img class="icon-img-content" :src="item.imgUrl" />
      <p class="icon-desc">{{item.desc}}</p>
    </router-link>
  </div>
</template>

<script>
export default {
  name: "HomeIcons",
  props:{
    iconList: Array
  },
  data() {
    return {
      
    };
  }
};
</script>

<style lang="scss" scoped>
@import 'styles/varibles.styl';
.icons {
  position: relative;
  top: -1rem;
  overflow: hidden;
  height: 0;
  padding-bottom: 18%;
  // background-color: $bgColor;
  background-image: linear-gradient($bgColor, #ffffff);
  .icon {
    position: relative;
    float: left;
    width: 25%;
    height: 0;
    padding-bottom: 18%;
    img {
        width: 50%;
        margin-left: 25%;
    }
    .icon-desc {
      position: absolute;
      left: 0;
      bottom: 0;
      right: 0;
      text-align: center;
      height: 0.44rem;
      color: #333;
      line-height: 0.44rem;
    }
  }
}
</style>